home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 9
/
FM Towns Free Software Collection 9.iso
/
t_os
/
joke
/
yen
/
yen.bas
< prev
next >
Wrap
BASIC Source File
|
1994-11-16
|
4KB
|
116 lines
100 '======================================================
110 ' いくらでSHOW
120 ' by 前工 電子研究部 (12ドット表示用)
130 '======================================================
140 '
150 CLEAR:DEFINT A-Z:RANDOMIZE TIME
160 MOUSE 0:ON MOUSE(4) GOSUB *END
170 '
180 OO=(INT((INT((50+7)/8)*50*5+2-1)/2))
190 DIM OKANE(OO*6)
200 SCREEN 1,,0
210 LOAD@ "YEN.TIF"
220 FOR I=0 TO 5
230 GET@A (0,I*50)-(49,I*50+49),OKANE,I*OO
240 NEXT
250 '
260 SCREEN 0
270 SCREEN@ 0:WINDOW (0,0)-(639,479):VIEW (0,0)-(639,479):CLS
280 '
290 DIM IKURA(10000),DESITA(8000),MARU(12000),BATU(12000)
300 LOAD@ "IKURA.SND",IKURA:LOAD@ "ENDESITA.SND",DESITA
310 LOAD@ "MARU.SND",MARU:LOAD@ "BATU.SND",BATU
320 '
330 DIM YEN1(8500),YEN5(11000),YEN10(16000),YEN50(17000),YEN100(26000),YEN500(7000)
340 LOAD@ "YEN1.SND",YEN1:LOAD@ "YEN5.SND",YEN5:LOAD@ "YEN10.SND",YEN10
350 LOAD@ "YEN50.SND",YEN50:LOAD@ "YEN100.SND",YEN100:LOAD@ "YEN500.SND",YEN500
360 '
370 DIM EN1(2300),EN5(1500),EN10(8000),EN50(5000),EN100(4000),EN500(6000)
380 LOAD@ "1YEN.SND",EN1:LOAD@ "5YEN.SND",EN5:LOAD@ "10YEN.SND",EN10
390 LOAD@ "50YEN.SND",EN50:LOAD@ "100YEN.SND",EN100:LOAD@ "500YEN.SND",EN500
400 '
410 GOSUB *TITLE
420 Y_OF=50:X_OF=250:DEF PEN 0,3:CONSOLE 2,21
430 FOR I=0 TO 5
440 PUT@A (X_OF,Y_OF+I*50)-(X_OF+49,Y_OF+I*50+49),OKANE,PSET,1,1,,OO*I
450 NEXT
460 '
470 MOUSE 1,,,1:MOUSE 4,X_OF,Y_OF,X_OF+49,Y_OF+50*6-1
480 SYMBOL (400,70),"右クリックで終了",1,1,6:MOUSE (4) ON
490 '
500 *MAIN '--------------------------------------------------
510 PRINT "いくらでしょう?"
520 LINE (350,250)-(640,480),PSET,0,BF:SYMBOL (350,250),"?",15,13,7
530 PCMPLAY IKURA:WAIT 110
540 R=INT (RND(1)*6)
550 IF R=0 THEN PCMPLAY YEN1:Q$="一"
560 IF R=1 THEN PCMPLAY YEN5:Q$="五"
570 IF R=2 THEN PCMPLAY YEN10:Q$="十"
580 IF R=3 THEN PCMPLAY YEN50:Q$="五十"
590 IF R=4 THEN PCMPLAY YEN100:Q$="百"
600 IF R=5 THEN PCMPLAY YEN500:Q$="五百"
610 WAIT 100
620 GOSUB *INPUT
630 GOSUB *CHECK
640 IF R=0 THEN PCMPLAY EN1
650 IF R=1 THEN PCMPLAY EN5
660 IF R=2 THEN PCMPLAY EN10
670 IF R=3 THEN PCMPLAY EN50
680 IF R=4 THEN PCMPLAY EN100
690 IF R=5 THEN PCMPLAY EN500
700 WAIT 50
710 PRINT Q$;"円でした。":PRINT
720 PCMPLAY DESITA
730 WAIT 160:N=N+1:MOUSE (4) ON
740 GOTO *MAIN
750 '
760 *INPUT '--------------------------------------------------
770 COIN=( MOUSE(1)-Y_OF )\ 50
780 LINE (X_OF,Y_OF+COIN*50)-(X_OF+49,Y_OF+COIN*50+49),XOR,4,B
790 WHILE MOUSE(2,0)=0
800 COIN_A=COIN:COIN=( MOUSE(1)-Y_OF )\ 50
810 IF COIN<>COIN_A THEN
820 LINE (X_OF,Y_OF+COIN_A*50)-(X_OF+49,Y_OF+COIN_A*50+49),XOR,4,B
830 LINE (X_OF,Y_OF+COIN*50)-(X_OF+49,Y_OF+COIN*50+49),XOR,4,B
840 ENDIF
850 WEND
860 LINE (X_OF,Y_OF+COIN*50)-(X_OF+49,Y_OF+COIN*50+49),XOR,4,B
870 MOUSE (4) OFF
880 RETURN
890 '
900 *CHECK '--------------------------------------------------
910 IF R=COIN THEN
920 PRINT "正解":P=P+1:PCMPLAY MARU
930 ELSE
940 PRINT "はずれ":PCMPLAY BATU
950 ENDIF
960 FOR I=1 TO 28
970 PUT@A (350,250)-(350+49,250+49),OKANE,PSET,5,5,,OO*R+I
980 NEXT I
990 WAIT 100
1000 RETURN
1010 '
1020 *END '----------------------------------------------------
1030 MOUSE 5:E=1:CLS 4:GOSUB *TITLE
1040 WAIT 200
1050 END
1060 '
1070 *TITLE '====================================================
1080 FOR I=1 TO 1000
1090 X=INT(RND(1)*590) :Y=INT(RND(1)*430)
1100 PUT@A (X,Y)-(X+49,Y+49),OKANE,MATTE,1,1,0,OO*INT(RND(1)*6)
1110 NEXT
1120 '
1130 SYMBOL (50,80),"いくらでSHOW",4,6,5,,PSET,13
1140 IF E=1 THEN
1150 IF N=0 THEN P=0 : N=1 '一つも問題に答えなかった時
1160 SYMBOL (50,190)," 正答率"+STR$(INT(P/N*100))+" %",4,6,%9,,PSET,13
1170 SYMBOL (50,310)," 終了",6,6,5,,PSET,13
1180 ELSE
1190 SYMBOL (50,310),"HIT 左クリック",4,4,%9,,PSET,13
1200 WHILE MOUSE (2,0)=0 :WEND
1210 CLS
1220 WAIT 100
1230 ENDIF
1240 RETURN